package com.safe.first.domain.user;

import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.safe.first.common.handler.ArrayTypeHandler;
import lombok.Data;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author Mickey
 * @since 2022/6/27
 **/
@Data
public class UserLoginWay {

    private Integer type;
    private String uniqueId;

    @Component
    public static class LoginWayArrayType extends ArrayTypeHandler<UserLoginWay> {
        public LoginWayArrayType(ObjectMapper objectMapper) {
            super(objectMapper);
        }

        @Override
        public TypeReference<List<UserLoginWay>> getType() {
            return new TypeReference<>() {
            };
        }
    }

}
